package com.study.javaBasic.java_enum;

public class MainTest {
    public static void main(String[] args) {
        Weekday day = Weekday.SUN;
        if (day == Weekday.SAT || day == Weekday.SUN) {
            System.out.println("Work at home!");
        } else {
            System.out.println("Work at office!");
        }

        MyWeekDay myday = MyWeekDay.SUN;
        if (myday.value == 6 || myday.value == 0) {
            System.out.println(myday.name + " Work at home!");
        } else {
            System.out.println(myday.name + " Work at office!");
        }
    }
}

enum Weekday {
    SUN,
    MON,
    TUE,
    WED,
    THU,
    FRI,
    SAT;
}

enum MyWeekDay {
    SUN(0, "sunday"),
    MON(1, "monday"),
    TUE(2, "tuesday"),
    WED(3, "wednesday"),
    THU(4, "thursday"),
    FRI(5, "friday"),
    SAT(6, "saturday");
    public final int value;
    public final String name;

    private MyWeekDay(int value, String name) {
        this.value = value;
        this.name = name;
    }
}
